﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ScreenMonitor
{

    public abstract class SmartImageProviderBase : Component
    {
        /// <summary>
        /// 取得预览图片
        /// </summary>
        /// <param name="PreviewImageSize">预览区域大小，预览图片应根据此大小来进行调整</param>
        /// <returns>取得的预览图片</returns>
        public abstract Image GetPreviewImage(Size PreviewBoxSize);
        /// <summary>
        /// 取得图像的一部分
        /// </summary>
        /// <param name="ViewRect">当前视图区域，图像应根据此区域进行裁剪</param>
        /// <param name="ImageSize">返回图片大小，图片应根据此大小进行缩放</param>
        /// <returns>裁剪后的图片</returns>
        public abstract Image GetPartImage(RectangleF ViewRect,SizeF ImageSize);
        /// <summary>
        /// 取得图像的物理大小
        /// </summary>
        /// <returns>图像的物理大小</returns>
        public abstract Size GetImagePhysicalSize();
        /// <summary>
        /// 取得对象是否已经初始化
        /// </summary>
        /// <returns></returns>
        public abstract bool IsInited();
        /// <summary>
        /// 初始化对象
        /// </summary>
        /// <param name="Viewer"></param>
        public abstract void Init(SmartImageViewer Viewer);
    }
}
